
/**
 *系统配置管理
 *
 */
const baseServerUrl =
  window.location.hostname.indexOf("u.wezhan.cn") == -1
    ? "u.wezhan.cn"
    : "u.wezhan.cn";

const httpSchema = "https://"; //2020-3-23演示环境也改为了https

/**生产环境-- */
let productApi = `${httpSchema}bcapi.${baseServerUrl}`;
let loginApi = `${httpSchema}bclogin.${baseServerUrl}`;
//

let uploadPicUrl = `${httpSchema}bcapi.u.wezhan.cn/api/v1/Product/UploadImage`;

let authorityUrl = `${httpSchema}bclogin.${baseServerUrl}`;
let redirectUrl = `${httpSchema}content.${baseServerUrl}/callback`;
let logoutRedirectUri = `${httpSchema}content.${baseServerUrl}/index.html`;
let silentRedirectUri = `${httpSchema}content.${baseServerUrl}/static/silent-renew.html`;
let clientId = "prd.app";
let scope = "openid profile prd.api";
export let siteDomain = `content.${baseServerUrl}`;
export const dashboardSiteDomain = `${httpSchema}dashboard.${baseServerUrl}`;
export let errorUrl = `${httpSchema}login.${baseServerUrl}/404`;
// 个人中心
export let personalUrl = `${httpSchema}dashboard.${baseServerUrl}/personal`;
export let dashboardUrl = `${httpSchema}dashboard.${baseServerUrl}/board`;
export let akskUrl = `${httpSchema}dashboard.${baseServerUrl}/systemsetting/aliaksk`;


if (process.env.NODE_ENV === "development") {
  loginApi = `${httpSchema}bclogin.${baseServerUrl}`;
  productApi = `${httpSchema}bcapi.${baseServerUrl}`;
  uploadPicUrl = `${httpSchema}bcapi.u.wezhan.cn/api/v1/Product/UploadImage`;
  authorityUrl = `${httpSchema}bclogin.${baseServerUrl}`;
  redirectUrl = `http://localhost:8081/callback`;
  logoutRedirectUri = `${httpSchema}content.mofuncloud.com/index.html`;
  silentRedirectUri = `http://localhost:8081/static/silent-renew.html`;
  clientId = "devprd.app";
  scope = "openid profile prd.api";

}
const environment = {
  loginApi,
  productApi,
  authorityUrl,
  redirectUrl,
  logoutRedirectUri,
  uploadPicUrl,
  silentRedirectUri,
  clientId,
  scope,
};
export default environment;